﻿using Newtonsoft.Json;
using ST.Common.Util.Mvc;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ST.Buz.Base.Entity
{
	/// <summary>
	/// 布加工
	/// </summary>
	[Serializable]
	[Table("BJG_Machining")]
	public partial class BJG_Machining
	{
		[Key]
		[Column("ID")]
		public int ID { get; set; }

		/// <summary>
		/// 流水号
		/// </summary>
		[Column("SNo")]
		[StringLength(32, ErrorMessage = "{0}长度不能超过{1}")]
		public string SNo { get; set; }

		/// <summary>
		/// 加工类型
		/// </summary>
		[Column("MachiningType")]
		public int MachiningType { get; set; }

		/// <summary>
		/// 客户ID
		/// </summary>
		[Column("PartnerID")]
		public int PartnerID { get; set; }

		/// <summary>
		/// 布行名
		/// </summary>
		[Column("PartnerName")]
		[StringLength(120, ErrorMessage = "{0}长度不能超过{1}")]
		public string PartnerName { get; set; }

		/// <summary>
		/// 布行客户名
		/// </summary>
		[Column("PartnerContactMan")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string PartnerContactMan { get; set; }

		/// <summary>
		/// 送货日期
		/// </summary>
		[JsonConverter(typeof(DateTimeJsonConverter), "yyyy-MM-dd")]
		[Column("DeliveryDate")]
		public DateTime DeliveryDate { get; set; }

		/// <summary>
		/// 送货人
		/// </summary>
		[Column("DeliveryMan")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string DeliveryMan { get; set; }

		/// <summary>
		/// 联系电话
		/// </summary>
		[Column("DeliveryPhone")]
		[StringLength(30, ErrorMessage = "{0}长度不能超过{1}")]
		public string DeliveryPhone { get; set; }

		/// <summary>
		/// 卷数
		/// </summary>
		[Column("Rolls")]
		public decimal Rolls { get; set; }

		/// <summary>
		/// 米数
		/// </summary>
		[Column("Meters")]
		public decimal Meters { get; set; }

		/// <summary>
		/// 单价/米
		/// </summary>
		[Column("Price")]
		public decimal Price { get; set; }

		/// <summary>
		/// 总价=米数*单价
		/// </summary>
		[Column("Total")]
		public decimal Total { get; set; }

		/// <summary>
		/// 状态
		/// </summary>
		[Column("StateNow")]
		public int StateNow { get; set; }

		/// <summary>
		/// 收款方式（现金收款、记应收账款、用预收款支付）
		/// </summary>
		[Column("RecvType")]
		public int RecvType { get; set; }

		/// <summary>
		/// 支付方式（现金、银行转账、微信、支付宝、网银、现金支票、银行支票、电汇）
		/// </summary>
		[Column("RecvWay")]
		public int RecvWay { get; set; }

		/// <summary>
		/// 付款金额
		/// </summary>
		[Column("PreRecvTotal")]
		public decimal PreRecvTotal { get; set; }

		/// <summary>
		/// 备注
		/// </summary>
		[Column("Comment")]
		[StringLength(100, ErrorMessage = "{0}长度不能超过{1}")]
		public string Comment { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		[Column("AddDate")]
		public DateTime AddDate { get; set; }

		/// <summary>
		/// 创建人ID
		/// </summary>
		[Column("AddManID")]
		[JsonIgnore]
		public int AddManID { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		[Column("AddManName")]
		[StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
		public string AddManName { get; set; }

		/// <summary>
		/// OrgID
		/// </summary>
		[JsonIgnore]
		[Column("OrgID")]
		public int OrgID { get; set; }


	}
}
